﻿using Microsoft.Phone.Controls;
using Putta.KeyPass.DatabaseProviders;
using Putta.KeyPass.Resources;
using System;
using System.Windows;

namespace Putta.KeyPass
{
    public partial class OpenDatabasePage : PhoneApplicationPage
    {
        public OpenDatabasePage()
        {
            InitializeComponent();

            DataContext = new DatabaseProviderProperties[]
            {
                new DatabaseProviderProperties(AppResources.SkyDriveName, new Uri("/Assets/Icons/SkyDrive.png", UriKind.Relative), new Uri("/SkyDriveSetupPage.xaml", UriKind.Relative))
            };
        }

        private void OnDatabaseProviderTap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            NavigationService.Navigate(((DatabaseProviderProperties)(((FrameworkElement)sender).DataContext)).SetupPage);
        }
    }
}